IOMMU: add a timeout parameter for device IOTLB invalidation
authorQuan Xu <quan.xu@intel.com>
Tue, 28 Jun 2016 09:33:39 +0000 (11:33 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 28 Jun 2016 09:33:39 +0000 (11:33 +0200)
commitdca07f30021ca0840bd923f107d546301a5dba7a
treec98ce5c0c6c82e4f98b335245b1b0f0729f92049
parent08cffe6696c047123bd552e095163924c8ef4353
IOMMU: add a timeout parameter for device IOTLB invalidation

The parameter 'iommu_dev_iotlb_timeout' specifies the timeout
of device IOTLB invalidation in milliseconds. By default, the
timeout is 1000 milliseconds, which can be boot-time changed.

We also confirmed with VT-d hardware team that 1 milliseconds
is large enough for VT-d IOMMU internal invalidation.

the existing panic() is eliminated and we bubble up the timeout
of device IOTLB invalidation for further processing, as the
PCI-e Address Translation Services (ATS) mandates a timeout of
60 seconds for device IOTLB invalidation. Obviously we can't
spin for 60 seconds or otherwise Xen hypervisor hangs.

Signed-off-by: Quan Xu <quan.xu@intel.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
docs/misc/xen-command-line.markdown
xen/drivers/passthrough/iommu.c
xen/drivers/passthrough/vtd/qinval.c
xen/include/xen/iommu.h